package com.gorkr.labuladong.data_struct.array;

/**
 * @author gorkr
 * @date 2022/06/03 10:39
 **/
public class E28RemoveElement {
    public int removeElement(int[] nums, int val) {
        int low = 0,  fast = 0;

        while(fast< nums.length){
            if (nums[fast] != val) {
                nums[low] = nums[fast];
                low++;
            }
            fast++;

        }
        return low;

    }
}
    